package elsa.bootmapper;

import java.util.List;

import org.apache.ibatis.annotations.*;

import elsa.bean.*;

@Mapper
public interface OpsMapper {

	/*
	 * 营运检验操作
	 */
	//信息提醒条数(所有 管理员/负责人)
	@Select("select count(*) from scs_opsinsp")
	int opsInfoReminderCount();

	//信息提醒(所有 管理员/负责人)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp order by alltime desc")
	List<ScsOpsinsp>  opsInfoReminder();

	//信息提醒条数(船检登记号 模糊查询 管理员/负责人)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%')")
	int opsInfoReminderCountByRgstnum(String rgstnum);

	//信息提醒(船检登记号 模糊查询 管理员/负责人)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') order by alltime desc")
	List<ScsOpsinsp>  opsInfoReminderByRgstnum(String rgstnum);

	//信息提醒条数(船名 模糊查询 管理员/负责人)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%')")
	int opsInfoReminderCountByShipname(String shipname);

	//信息提醒(船名 模糊查询 管理员/负责人)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') order by alltime desc")
	List<ScsOpsinsp>  opsInfoReminderByShipname(String shipname);

	//信息提醒条数(所有 验船师)
	@Select("select count(*) from scs_opsinsp where (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用'")
	int opsYcsInfoReminderCount(String ycsid);

	//信息提醒(所有 验船师)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsYcsInfoReminder(String ycsid);

	//信息提醒条数(船检登记号 模糊查询 验船师)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用'")
	int opsYcsInfoReminderCountByRgstnum(@Param("rgstnum") String rgstnum, @Param("ycsid") String ycsid);

	//信息提醒(船检登记号 模糊查询 验船师)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsYcsInfoReminderByRgstnum(@Param("rgstnum") String rgstnum, @Param("ycsid") String ycsid);

	//信息提醒条数(船名 模糊查询 验船师)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用'")
	int opsYcsInfoReminderCountByShipname(@Param("shipname") String shipname, @Param("ycsid") String ycsid);

	//信息提醒(船名 模糊查询 验船师)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsYcsInfoReminderByShipname(@Param("shipname") String shipname, @Param("ycsid") String ycsid);


	//信息提醒条数(所有 船厂)
	@Select("select count(*) from scs_opsinsp where ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用'")
	int opsCcInfoReminderCount(String ccid);

	//信息提醒(所有 船厂)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsCcInfoReminder(String ccid);

	//信息提醒条数(船检登记号 模糊查询 船厂)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用'")
	int opsCcInfoReminderCountByRgstnum(@Param("rgstnum") String rgstnum, @Param("ccid") String ccid);

	//信息提醒(船检登记号 模糊查询 船厂)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsCcInfoReminderByRgstnum(@Param("rgstnum") String rgstnum, @Param("ccid") String ccid);

	//信息提醒条数(船名 模糊查询 船厂)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用'")
	int opsCcInfoReminderCountByShipname(@Param("shipname") String shipname, @Param("ccid") String ccid);

	//信息提醒(船名 模糊查询 船厂)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsCcInfoReminderByShipname(@Param("shipname") String shipname, @Param("ccid") String ccid);

	//信息提醒条数(所有 船东)
	@Select("select count(*) from scs_opsinsp where cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用'")
	int opsCdInfoReminderCount(String cdid);

	//信息提醒(所有 船东)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsCdInfoReminder(String cdid);

	//信息提醒条数(船检登记号 模糊查询 船东)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用'")
	int opsCdInfoReminderCountByRgstnum(@Param("rgstnum") String rgstnum, @Param("cdid") String cdid);

	//信息提醒(船检登记号 模糊查询 船东)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsCdInfoReminderByRgstnum(@Param("rgstnum") String rgstnum, @Param("cdid") String cdid);

	//信息提醒条数(船名 模糊查询 船东)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用'")
	int opsCdInfoReminderCountByShipname(@Param("shipname") String shipname, @Param("cdid") String cdid);

	//信息提醒(船名 模糊查询 船东)
	@Select("select rgstnum, shipname, alltime, allstate from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用' order by alltime desc")
	List<ScsOpsinsp>  opsCdInfoReminderByShipname(@Param("shipname") String shipname, @Param("cdid") String cdid);


	//更新所有状态
	@Update("update scs_opsinsp set allstate = #{allstate,jdbcType=VARCHAR},alltime = #{alltime} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateAll(ScsOpsinsp scs_opsinsp);


	//历史查询营运检验条数(所有)
	@Select("select count(*) from scs_opsinsp where state = '完成'")
	int historyAllOpsCount();

	//历史查询营运检验列表(所有)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where state = '完成' order by latesttime desc")
	List<ScsOpsinsp> historyAllOps();

	//历史查询营运检验条数(船检登记号 模糊查询)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and state = '完成'")
	int historyRgstnumOpsCount(String rgstnum);

	//历史查询营运检验列表(船检登记号 模糊查询)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and state = '完成' order by latesttime desc")
	List<ScsOpsinsp> historyRgstnumOps(String rgstnum);

	//历史查询营运检验条数(船名 模糊查询)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and state = '完成'")
	int historyShipnameOpsCount(String shipname);

	//历史查询营运检验列表(船名 模糊查询)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and state = '完成' order by latesttime desc")
	List<ScsOpsinsp> historyShipnameOps(String shipname);


	//档案查询(所有)
	@Select("select count(*) from scs_opsinsp")
	int opsArchivesCount();

	//档案查询(所有)
	@Select("select rgstnum, inspnum, shipname, hostpower, shiplength, grosston from scs_opsinsp order by alltime desc")
	List<ScsOpsinsp> opsArchives();

	//档案查询(检验编号 模糊查询)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%')")
	int opsArchivesCountByRgstnum(String rgstnum);

	//档案查询(检验编号 模糊查询)
	@Select("select rgstnum, inspnum, shipname, hostpower, shiplength, grosston from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') order by alltime desc")
	List<ScsOpsinsp> opsArchivesByRgstnum(String rgstnum);

	//档案查询(船检登记号 模糊查询)
	@Select("select count(*) from scs_opsinsp where inspnum like CONCAT(CONCAT('%', #{inspnum}), '%')")
	int opsArchivesCountByInspnum(String inspnum);

	//档案查询(船检登记号 模糊查询)
	@Select("select rgstnum, inspnum, shipname, hostpower, shiplength, grosston from scs_opsinsp where inspnum like CONCAT(CONCAT('%', #{inspnum}), '%') order by alltime desc")
	List<ScsOpsinsp> opsArchivesByInspnum(String inspnum);

	//档案查询(船名 模糊查询)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%')")
	int opsArchivesCountByShipname(String shipname);

	//档案查询(船名 模糊查询)
	@Select("select rgstnum, inspnum, shipname, hostpower, shiplength, grosston from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') order by alltime desc")
	List<ScsOpsinsp> opsArchivesByShipname(String shipname);


	//查询营运检验条数(所有 管理员/负责人)
	@Select("select count(*) from scs_opsinsp")
	int findOpsCount();

	//查询营运检验列表(所有 管理员/负责人)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp order by latesttime desc")
	List<ScsOpsinsp> findAllOps();

	//查询营运检验条数(船检登记号 模糊查询 管理员/负责人)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%')")
	int findOpsCountByRgstnum(String rgstnum);

	//查询营运检验列表(船检登记号 模糊查询 管理员/负责人)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') order by latesttime desc")
	List<ScsOpsinsp> findAllOpsByRgstnum(String rgstnum);

	//查询营运检验条数(船名 模糊查询 管理员/负责人)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%')")
	int findOpsCountByShipname(String shipname);

	//查询营运检验列表(船名 模糊查询 管理员/负责人)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') order by latesttime desc")
	List<ScsOpsinsp> findAllOpsByShipname(String shipname);

	//查询营运检验条数(所有 验船师)
	@Select("select count(*) from scs_opsinsp where (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用'")
	int findYcsOpsCount(String ycsid);

	//查询营运检验列表(所有 验船师)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findYcsOps(String ycsid);

	//查询营运检验条数(船检登记号 模糊查询 验船师)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用'")
	int findYcsOpsCountByRgstnum(@Param("rgstnum") String rgstnum, @Param("ycsid") String ycsid);

	//查询营运检验列表(船检登记号 模糊查询 验船师)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findYcsOpsByRgstnum(@Param("rgstnum") String rgstnum, @Param("ycsid") String ycsid);

	//查询营运检验条数(船名 模糊查询 验船师)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用'")
	int findYcsOpsCountByShipname(@Param("shipname") String shipname, @Param("ycsid") String ycsid);

	//查询营运检验列表(船名 模糊查询 验船师)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and (ycs1id = #{ycsid,jdbcType=VARCHAR} or ycs2id = #{ycsid,jdbcType=VARCHAR} or ycs3id = #{ycsid,jdbcType=VARCHAR}) and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findYcsOpsByShipname(@Param("shipname") String shipname, @Param("ycsid") String ycsid);

	//查询营运检验条数(所有 船厂)
	@Select("select count(*) from scs_opsinsp where ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用'")
	int findCcOpsCount(String ccid);

	//查询营运检验列表(所有 船厂)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findCcOps(String ccid);

	//查询营运检验条数(船检登记号 模糊查询 船厂)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用'")
	int findCcOpsCountByRgstnum(@Param("rgstnum") String rgstnum, @Param("ccid") String ccid);

	//查询营运检验列表(船检登记号 模糊查询 船厂)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findCcOpsByRgstnum(@Param("rgstnum") String rgstnum, @Param("ccid") String ccid);

	//查询营运检验条数(船名 模糊查询 船厂)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用'")
	int findCcOpsCountByShipname(@Param("shipname") String shipname, @Param("ccid") String ccid);

	//查询营运检验列表(船名 模糊查询 船厂)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and ccid = #{ccid,jdbcType=VARCHAR} and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findCcOpsByShipname(@Param("shipname") String shipname, @Param("ccid") String ccid);

	//查询营运检验条数(所有 船东)
	@Select("select count(*) from scs_opsinsp where cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用'")
	int findCdOpsCount(String cdid);

	//查询营运检验列表(所有 船东)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findCdOps(String cdid);

	//查询营运检验条数(船检登记号 模糊查询 船东)
	@Select("select count(*) from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用'")
	int findCdOpsCountByRgstnum(@Param("rgstnum") String rgstnum, @Param("cdid") String cdid);

	//查询营运检验列表(船检登记号 模糊查询 船东)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where rgstnum like CONCAT(CONCAT('%', #{rgstnum}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findCdOpsByRgstnum(@Param("rgstnum") String rgstnum, @Param("cdid") String cdid);

	//查询营运检验条数(船名 模糊查询 船东)
	@Select("select count(*) from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用'")
	int findCdOpsCountByShipname(@Param("shipname") String shipname, @Param("cdid") String cdid);

	//查询营运检验列表(船名 模糊查询 船东)
	@Select("select rgstnum, inspnum, shipname, insptype, inspaddress, dockingdate, ycs1name, ycs2name, ycs3name, ccinfo, cdname, state from scs_opsinsp where shipname like CONCAT(CONCAT('%', #{shipname}), '%') and cdid = #{cdid,jdbcType=VARCHAR} and state != '禁用' order by latesttime desc")
	List<ScsOpsinsp> findCdOpsByShipname(@Param("shipname") String shipname, @Param("cdid") String cdid);

	//查询营运检验信息(船检登记号)
	@Select("select rgstnum, inspnum, shipname, inspnum, insptype, shiplength, grosston, hostpower, region, shipstops, shiptype, inspaddress, dockingdate, apnttime, cdname, cdusername, info1, info1adr, info2, info2adr, info3, info3adr, info4, info4name, "
			+ "info4adr, additional, apunitname, fax, zipcode, crecode, writedate, ccadr, writename, ccinfo, remarks, state, flag, ycs1name, ycs1username, ycs2name, ycs2username, ycs3name, ycs3username, headman, auditstate, auditopn, auditdate, latesttime, allstate from scs_opsinsp where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsOpsinsp findOpsByRgstnum(String rgstnum);

	//检查营运检验信息(船检登记号)
	@Select("select rgstnum, shipname, inspnum, insptype, shiplength, grosston, hostpower, region, shipstops, shiptype, inspaddress, dockingdate, apnttime, cdname, cdusername, info1, info1adr, info2, info2adr, info3, info3adr, info4, info4name, "
			+ "info4adr, additional, apunitname, fax, zipcode, crecode, writedate, ccadr, writename, ccinfo, remarks, state, flag, ycs1name, ycs1username, ycs2name, ycs2username, ycs3name, ycs3username, headman, auditstate, auditopn, auditdate, latesttime from scs_opsinsp where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsOpsinsp findOpsByRgstnumForcheck(String rgstnum);

	//打印营运检验
	@Select("select rgstnum, shipname, inspnum, insptype, shiplength, grosston, hostpower, region, shipstops, shiptype, inspaddress, dockingdate, apnttime, cdname, cdusername, info1, info2, info3, info4, info4name, "
			+ "additional, apunitname, fax, zipcode, crecode, writedate, ccadr, writename, ccinfo, remarks from scs_opsinsp where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsOpsinsp printOps(String rgstnum);

	//新建营运检验-船厂提交
	@Insert("insert into scs_opsinsp (rgstnum, shipname, inspnum, insptype, shiplength, grosston, hostpower, region, shipstops, shiptype, inspaddress, dockingdate, apnttime, cdname, cdusername, info1, "
			+ "info1adr, info2, info2adr, info3, info3adr, info4, info4name, info4adr, additional, apunitname, fax, zipcode, crecode, writedate, ccadr, writename, ccinfo, remarks, allstate, alltime, state, flag, latesttime, ccid, cdid) values (#{rgstnum,jdbcType=VARCHAR}, #{shipname,jdbcType=VARCHAR}, #{inspnum,jdbcType=VARCHAR}, #{insptype,jdbcType=VARCHAR}, #{shiplength,jdbcType=VARCHAR}, #{grosston,jdbcType=VARCHAR}, "
			+ "#{hostpower,jdbcType=VARCHAR}, #{region,jdbcType=VARCHAR}, #{shipstops,jdbcType=VARCHAR}, #{shiptype,jdbcType=VARCHAR}, #{inspaddress,jdbcType=VARCHAR}, #{dockingdate,jdbcType=DATE}, #{apnttime,jdbcType=DATE}, #{cdname,jdbcType=VARCHAR}, #{cdusername,jdbcType=VARCHAR}, #{info1,jdbcType=BIT}, "
			+ "#{info1adr,jdbcType=VARCHAR}, #{info2,jdbcType=BIT}, #{info2adr,jdbcType=VARCHAR}, #{info3,jdbcType=BIT}, #{info3adr,jdbcType=VARCHAR}, #{info4,jdbcType=BIT}, #{info4name,jdbcType=VARCHAR}, #{info4adr,jdbcType=VARCHAR}, #{additional,jdbcType=VARCHAR}, #{apunitname,jdbcType=VARCHAR}, "
			+ "#{fax,jdbcType=VARCHAR}, #{zipcode,jdbcType=VARCHAR}, #{crecode,jdbcType=VARCHAR}, #{writedate,jdbcType=DATE}, #{ccadr,jdbcType=VARCHAR}, #{writename,jdbcType=VARCHAR}, #{ccinfo,jdbcType=VARCHAR}, #{remarks,jdbcType=VARCHAR}, #{allstate,jdbcType=VARCHAR}, #{alltime}, #{state,jdbcType=VARCHAR}, #{flag,jdbcType=VARCHAR}, #{latesttime}, #{ccid,jdbcType=VARCHAR}, #{cdid,jdbcType=VARCHAR})")
	void saveOps(ScsOpsinsp scsOpsinsp);

	//更新营运检验-船厂提交
	@Update("update scs_opsinsp set shipname = #{shipname,jdbcType=VARCHAR},inspnum = #{inspnum,jdbcType=VARCHAR},insptype = #{insptype,jdbcType=VARCHAR},"
			+ "shiplength = #{shiplength,jdbcType=VARCHAR},grosston = #{grosston,jdbcType=VARCHAR},hostpower = #{hostpower,jdbcType=VARCHAR},region = #{region,jdbcType=VARCHAR},shipstops = #{shipstops,jdbcType=VARCHAR},shiptype = #{shiptype,jdbcType=VARCHAR},"
			+ "inspaddress = #{inspaddress,jdbcType=VARCHAR},dockingdate = #{dockingdate,jdbcType=DATE},apnttime = #{apnttime,jdbcType=DATE},cdname = #{cdname,jdbcType=VARCHAR},cdusername = #{cdusername,jdbcType=VARCHAR}"
			+ ",additional = #{additional,jdbcType=VARCHAR},apunitname = #{apunitname,jdbcType=VARCHAR},fax = #{fax,jdbcType=VARCHAR},zipcode = #{zipcode,jdbcType=VARCHAR},crecode = #{crecode,jdbcType=VARCHAR},writedate = #{writedate,jdbcType=DATE},"
			+ "ccadr = #{ccadr,jdbcType=VARCHAR},writename = #{writename,jdbcType=VARCHAR},ccinfo = #{ccinfo,jdbcType=VARCHAR},remarks = #{remarks,jdbcType=VARCHAR},alltime = #{alltime},latesttime = #{latesttime},ccid = #{ccid,jdbcType=VARCHAR},cdid = #{cdid,jdbcType=VARCHAR} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateOps(ScsOpsinsp scsOpsinsp);

	//更新营运检验-船检处审核+检验编号
	@Update("update scs_opsinsp set rgstnum = #{argstnum,jdbcType=VARCHAR},ycs1name = #{ycs1name,jdbcType=VARCHAR},ycs1username = #{ycs1username,jdbcType=VARCHAR},ycs2name = #{ycs2name,jdbcType=VARCHAR},ycs2username = #{ycs2username,jdbcType=VARCHAR},ycs3name = #{ycs3name,jdbcType=VARCHAR},"
			+ "ycs3username = #{ycs3username,jdbcType=VARCHAR},headman = #{headman,jdbcType=INTEGER},auditstate = #{auditstate,jdbcType=VARCHAR},auditopn = #{auditopn,jdbcType=VARCHAR},auditdate = #{auditdate,jdbcType=DATE},allstate = #{allstate,jdbcType=VARCHAR},alltime = #{alltime},latesttime = #{latesttime},ycs1id = #{ycs1id,jdbcType=VARCHAR},ycs2id = #{ycs2id,jdbcType=VARCHAR},ycs3id = #{ycs3id,jdbcType=VARCHAR} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateOpsCjcjy(ScsOpsinsp scsOpsinsp);

	//更新营运检验-船检处审核
	@Update("update scs_opsinsp set ycs1name = #{ycs1name,jdbcType=VARCHAR},ycs1username = #{ycs1username,jdbcType=VARCHAR},ycs2name = #{ycs2name,jdbcType=VARCHAR},ycs2username = #{ycs2username,jdbcType=VARCHAR},ycs3name = #{ycs3name,jdbcType=VARCHAR},"
			+ "ycs3username = #{ycs3username,jdbcType=VARCHAR},headman = #{headman,jdbcType=INTEGER},auditstate = #{auditstate,jdbcType=VARCHAR},auditopn = #{auditopn,jdbcType=VARCHAR},auditdate = #{auditdate,jdbcType=DATE},allstate = #{allstate,jdbcType=VARCHAR},alltime = #{alltime},latesttime = #{latesttime},ycs1id = #{ycs1id,jdbcType=VARCHAR},ycs2id = #{ycs2id,jdbcType=VARCHAR},ycs3id = #{ycs3id,jdbcType=VARCHAR} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateOpsCjc(ScsOpsinsp scsOpsinsp);

	//完成营运检验
	@Update("update scs_opsinsp set state = '完成', flag = '完成' where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void completeOps(String rgstnum);

	//未完成营运检验
	@Update("update scs_opsinsp set state = '未完成', flag = '未完成' where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void uncompleteOps(String rgstnum);

	//禁用营运检验
	@Update("update scs_opsinsp set state = '禁用' where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void forbidOps(String rgstnum);

	//恢复营运检验
	@Update("update scs_opsinsp set state = flag where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void renewOps(String rgstnum);

	//删除营运检验
	@Update("delete from scs_opsinsp where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void deleteOps(String rgstnum);


	/*
	 * 质量控制表操作
	 */
	//查询质量控制表信息(船检登记号)
	@Select("select rgstnum, shipname, qccname, qccdate, cdopn, cdopndate, test1, test2d1, test2d2, test2d3, test2d4, test2d5, test2d6, test2d7, test2d8, test2d9, test2d10, test3 from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsQcc findQccByRgstnum(String rgstnum);

	//查询存在(质量控制表)
	@Select("select rgstnum from scs_qcc where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsQcc findQcc(String rgstnum);

	//打印质量控制表
	@Select("select shipname, insptype, qccname, qccdate, cdopn, cdopndate, test1, test2d1, test2d2, test2d3, test2d4, test2d5, test2d6, test2d7, test2d8, test2d9, test2d10, test3, cdname from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsQcc printQcc(String rgstnum);

	//新建质量控制表
	@Insert("insert into scs_qcc (rgstnum, qccname, qccdate, test1, test2d1, test2d2, test2d3, test2d4, test2d5, test2d6, test2d7, test2d8, test2d9, test2d10, test3) "
			+ "values (#{rgstnum,jdbcType=VARCHAR}, #{qccname,jdbcType=VARCHAR}, #{qccdate,jdbcType=DATE}, #{test1,jdbcType=BIT}, #{test2d1,jdbcType=BIT}, "
			+ "#{test2d2,jdbcType=BIT}, #{test2d3,jdbcType=BIT}, #{test2d4,jdbcType=BIT}, #{test2d5,jdbcType=BIT}, #{test2d6,jdbcType=BIT}, #{test2d7,jdbcType=BIT}, #{test2d8,jdbcType=BIT}, #{test2d9,jdbcType=BIT}, #{test2d10,jdbcType=BIT}, #{test3})")
	void saveQcc(ScsQcc scsQcc);

	//更新质量控制表
	@Update("update scs_qcc set qccname = #{qccname,jdbcType=VARCHAR},qccdate = #{qccdate,jdbcType=DATE},"
			+ "test1 = #{test1,jdbcType=BIT},test2d1 = #{test2d1,jdbcType=BIT},test2d2 = #{test2d2,jdbcType=BIT},test2d3 = #{test2d3,jdbcType=BIT},test2d4 = #{test2d4,jdbcType=BIT},"
			+ "test2d5 = #{test2d5,jdbcType=BIT},test2d6 = #{test2d6,jdbcType=BIT},test2d7 = #{test2d7,jdbcType=BIT},test2d8 = #{test2d8,jdbcType=BIT},test2d9 = #{test2d9,jdbcType=BIT},"
			+ "test2d10 = #{test2d10,jdbcType=BIT},test3 = #{test3} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateQcc(ScsQcc scsQcc);

	//更新质量控制表-船东意见
	@Update("update scs_qcc set cdopn = #{cdopn,jdbcType=VARCHAR},cdopndate = #{cdopndate,jdbcType=VARCHAR} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateQccCd(ScsQcc scsQcc);

	//删除质量控制表
	@Update("delete from scs_qcc where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void deleteQcc(String rgstnum);


	/*
	 * 船体设备效益试验记录表操作
	 */
	//查询船体设备效益试验记录表信息(船检登记号)
	@Select("select rgstnum, shipname, ctname, ctdate, ctt1jg, ctt1bz, ctt2jg, ctt2bz, ctt3jg, ctt3bz, ctt4jg, ctt4bz, ctt5jg, ctt5bz, ctt6jg, ctt6bz, ctt7jg, ctt7bz, ctt8jg, ctt8bz, ctt9jg, ctt9bz, ctt10jg, ctt10bz, ctt11jg, ctt11bz"
			+ " from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotect findNotectByRgstnum(String rgstnum);

	//打印船体设备效益试验记录表信息(船检登记号)
	@Select("select cdname, ctname, ctdate, ctt1jg, ctt1bz, ctt2jg, ctt2bz, ctt3jg, ctt3bz, ctt4jg, ctt4bz, ctt5jg, ctt5bz, ctt6jg, ctt6bz, ctt7jg, ctt7bz, ctt8jg, ctt8bz, ctt9jg, ctt9bz, ctt10jg, ctt10bz, ctt11jg, ctt11bz"
			+ " from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotect printNotect(String rgstnum);

	//查询存在(船体设备效益试验记录表)
	@Select("select rgstnum, ctstate from scs_notect where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotect findNotect(String rgstnum);

	//新建船体设备效益试验记录表
	@Insert("insert into scs_notect (rgstnum, ctname, ctstate, ctdate, ctt1jg, ctt1bz, ctt2jg, ctt2bz, ctt3jg, ctt3bz, ctt4jg, ctt4bz, ctt5jg, ctt5bz, ctt6jg, ctt6bz, ctt7jg, ctt7bz, "
			+ "ctt8jg, ctt8bz, ctt9jg, ctt9bz, ctt10jg, ctt10bz, ctt11jg, ctt11bz) values (#{rgstnum,jdbcType=VARCHAR}, #{ctname,jdbcType=VARCHAR}, #{ctstate,jdbcType=VARCHAR}, "
			+ "#{ctdate,jdbcType=DATE}, #{ctt1jg,jdbcType=VARCHAR}, #{ctt1bz,jdbcType=VARCHAR}, #{ctt2jg,jdbcType=VARCHAR}, #{ctt2bz,jdbcType=VARCHAR}, #{ctt3jg,jdbcType=VARCHAR}, #{ctt3bz,jdbcType=VARCHAR}, "
			+ "#{ctt4jg,jdbcType=VARCHAR}, #{ctt4bz,jdbcType=VARCHAR}, #{ctt5jg,jdbcType=VARCHAR}, #{ctt5bz,jdbcType=VARCHAR}, #{ctt6jg,jdbcType=VARCHAR}, #{ctt6bz,jdbcType=VARCHAR}, #{ctt7jg,jdbcType=VARCHAR}, #{ctt7bz,jdbcType=VARCHAR}, "
			+ "#{ctt8jg,jdbcType=VARCHAR}, #{ctt8bz,jdbcType=VARCHAR}, #{ctt9jg,jdbcType=VARCHAR}, #{ctt9bz,jdbcType=VARCHAR}, #{ctt10jg,jdbcType=VARCHAR}, #{ctt10bz,jdbcType=VARCHAR}, #{ctt11jg,jdbcType=VARCHAR}, #{ctt11bz,jdbcType=VARCHAR})")
	void saveNotect(ScsNotect scsNotect);

	//更新船体设备效益试验记录表
	@Update("update scs_notect set ctname = #{ctname,jdbcType=VARCHAR},ctstate = #{ctstate,jdbcType=VARCHAR},ctdate = #{ctdate,jdbcType=DATE},ctt1jg = #{ctt1jg,jdbcType=VARCHAR},ctt1bz = #{ctt1bz,jdbcType=VARCHAR},"
			+ "ctt2jg = #{ctt2jg,jdbcType=VARCHAR},ctt2bz = #{ctt2bz,jdbcType=VARCHAR},ctt3jg = #{ctt3jg,jdbcType=VARCHAR},ctt3bz = #{ctt3bz,jdbcType=VARCHAR},ctt4jg = #{ctt4jg,jdbcType=VARCHAR},"
			+ "ctt4bz = #{ctt4bz,jdbcType=VARCHAR},ctt5jg = #{ctt5jg,jdbcType=VARCHAR},ctt5bz = #{ctt5bz,jdbcType=VARCHAR},ctt6jg = #{ctt6jg,jdbcType=VARCHAR},ctt6bz = #{ctt6bz,jdbcType=VARCHAR},"
			+ "ctt7jg = #{ctt7jg,jdbcType=VARCHAR},ctt7bz = #{ctt7bz,jdbcType=VARCHAR},ctt8jg = #{ctt8jg,jdbcType=VARCHAR},ctt8bz = #{ctt8bz,jdbcType=VARCHAR},ctt9jg = #{ctt9jg,jdbcType=VARCHAR},"
			+ "ctt9bz = #{ctt9bz,jdbcType=VARCHAR},ctt10jg = #{ctt10jg,jdbcType=VARCHAR},ctt10bz = #{ctt10bz,jdbcType=VARCHAR},ctt11jg = #{ctt11jg,jdbcType=VARCHAR},ctt11bz = #{ctt11bz,jdbcType=VARCHAR} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateNotect(ScsNotect scsNotect);

	//删除船体设备效益试验记录表
	@Update("delete from scs_notect where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void deleteNotect(String rgstnum);


	/*
	 * 轮机设备效益试验记录表操作
	 */
	//查询轮机设备效益试验记录表信息(船检登记号)
	@Select("select rgstnum, shipname, ljname, ljdate, ljt1jg, ljt1bz, ljt2jg, ljt2bz, ljt3jg, ljt3bz, ljt4jg, ljt4bz, ljt5jg, ljt5bz, ljt6jg, ljt6bz, ljt7jg, ljt7bz, ljt8jg, ljt8bz, ljt9jg, ljt9bz, ljt10jg, ljt10bz, ljt11jg, ljt11bz, ljt12jg, ljt12bz"
			+ " from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotelj findNoteljByRgstnum(String rgstnum);

	//打印轮机设备效益试验记录表信息(船检登记号)
	@Select("select cdname, ljname, ljdate, ljt1jg, ljt1bz, ljt2jg, ljt2bz, ljt3jg, ljt3bz, ljt4jg, ljt4bz, ljt5jg, ljt5bz, ljt6jg, ljt6bz, ljt7jg, ljt7bz, ljt8jg, ljt8bz, ljt9jg, ljt9bz, ljt10jg, ljt10bz, ljt11jg, ljt11bz, ljt12jg, ljt12bz"
			+ " from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotelj printNotelj(String rgstnum);

	//查询存在(轮机设备效益试验记录表)
	@Select("select rgstnum, ljstate from scs_notelj where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotelj findNotelj(String rgstnum);

	//新建轮机设备效益试验记录表
	@Insert("insert into scs_notelj (rgstnum, ljname, ljstate, ljdate, ljt1jg, ljt1bz, ljt2jg, ljt2bz, ljt3jg, ljt3bz, ljt4jg, ljt4bz, ljt5jg, ljt5bz, ljt6jg, ljt6bz, ljt7jg, ljt7bz, "
			+ "ljt8jg, ljt8bz, ljt9jg, ljt9bz, ljt10jg, ljt10bz, ljt11jg, ljt11bz, ljt12jg, ljt12bz) values (#{rgstnum,jdbcType=VARCHAR}, #{ljname,jdbcType=VARCHAR}, #{ljstate,jdbcType=VARCHAR}, "
			+ "#{ljdate,jdbcType=DATE}, #{ljt1jg,jdbcType=VARCHAR}, #{ljt1bz,jdbcType=VARCHAR}, #{ljt2jg,jdbcType=VARCHAR}, #{ljt2bz,jdbcType=VARCHAR}, #{ljt3jg,jdbcType=VARCHAR}, #{ljt3bz,jdbcType=VARCHAR}, "
			+ "#{ljt4jg,jdbcType=VARCHAR}, #{ljt4bz,jdbcType=VARCHAR}, #{ljt5jg,jdbcType=VARCHAR}, #{ljt5bz,jdbcType=VARCHAR}, #{ljt6jg,jdbcType=VARCHAR}, #{ljt6bz,jdbcType=VARCHAR}, #{ljt7jg,jdbcType=VARCHAR}, #{ljt7bz,jdbcType=VARCHAR}, "
			+ "#{ljt8jg,jdbcType=VARCHAR}, #{ljt8bz,jdbcType=VARCHAR}, #{ljt9jg,jdbcType=VARCHAR}, #{ljt9bz,jdbcType=VARCHAR}, #{ljt10jg,jdbcType=VARCHAR}, #{ljt10bz,jdbcType=VARCHAR}, #{ljt11jg,jdbcType=VARCHAR}, "
			+ "#{ljt11bz,jdbcType=VARCHAR}, #{ljt12jg,jdbcType=VARCHAR}, #{ljt12bz,jdbcType=VARCHAR})")
	void saveNotelj(ScsNotelj scsNotelj);

	//更新轮机设备效益试验记录表
	@Update("update scs_notelj set ljname = #{ljname,jdbcType=VARCHAR},ljstate = #{ljstate,jdbcType=VARCHAR},ljdate = #{ljdate,jdbcType=DATE},ljt1jg = #{ljt1jg,jdbcType=VARCHAR},ljt1bz = #{ljt1bz,jdbcType=VARCHAR},"
			+ "ljt2jg = #{ljt2jg,jdbcType=VARCHAR},ljt2bz = #{ljt2bz,jdbcType=VARCHAR},ljt3jg = #{ljt3jg,jdbcType=VARCHAR},ljt3bz = #{ljt3bz,jdbcType=VARCHAR},ljt4jg = #{ljt4jg,jdbcType=VARCHAR},"
			+ "ljt4bz = #{ljt4bz,jdbcType=VARCHAR},ljt5jg = #{ljt5jg,jdbcType=VARCHAR},ljt5bz = #{ljt5bz,jdbcType=VARCHAR},ljt6jg = #{ljt6jg,jdbcType=VARCHAR},ljt6bz = #{ljt6bz,jdbcType=VARCHAR},"
			+ "ljt7jg = #{ljt7jg,jdbcType=VARCHAR},ljt7bz = #{ljt7bz,jdbcType=VARCHAR},ljt8jg = #{ljt8jg,jdbcType=VARCHAR},ljt8bz = #{ljt8bz,jdbcType=VARCHAR},ljt9jg = #{ljt9jg,jdbcType=VARCHAR},"
			+ "ljt9bz = #{ljt9bz,jdbcType=VARCHAR},ljt10jg = #{ljt10jg,jdbcType=VARCHAR},ljt10bz = #{ljt10bz,jdbcType=VARCHAR},ljt11jg = #{ljt11jg,jdbcType=VARCHAR},ljt11bz = #{ljt11bz,jdbcType=VARCHAR},"
			+ "ljt12jg = #{ljt12jg,jdbcType=VARCHAR},ljt12bz = #{ljt12bz,jdbcType=VARCHAR} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateNotelj(ScsNotelj scsNotelj);

	//删除轮机设备效益试验记录表
	@Update("delete from scs_notelj where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void deleteNotelj(String rgstnum);


	/*
	 * 电气设备效益试验记录表操作
	 */
	//查询电气设备效益试验记录表信息(船检登记号)
	@Select("select rgstnum, shipname, dqname, dqdate, dqt1jg, dqt1bz, dqt2jg, dqt2bz, dqt3jg, dqt3bz, dqt4jg, dqt4bz, dqt5jg, dqt5bz, dqt6jg, dqt6bz, dqt7jg, dqt7bz, dqt8jg, dqt8bz, dqt9jg, dqt9bz, dqt10jg, dqt10bz, dqt11jg, dqt11bz, dqt12jg, dqt12bz"
			+ " from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotedq findNotedqByRgstnum(String rgstnum);

	//打印电气设备效益试验记录表信息(船检登记号)
	@Select("select cdname, dqname, dqdate, dqt1jg, dqt1bz, dqt2jg, dqt2bz, dqt3jg, dqt3bz, dqt4jg, dqt4bz, dqt5jg, dqt5bz, dqt6jg, dqt6bz, dqt7jg, dqt7bz, dqt8jg, dqt8bz, dqt9jg, dqt9bz, dqt10jg, dqt10bz, dqt11jg, dqt11bz, dqt12jg, dqt12bz"
			+ " from opsinsp_view where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotedq printNotedq(String rgstnum);

	//查询存在(电气设备效益试验记录表)
	@Select("select rgstnum, dqstate from scs_notedq where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	ScsNotedq findNotedq(String rgstnum);

	//新建电气设备效益试验记录表
	@Insert("insert into scs_notedq (rgstnum, dqname, dqstate, dqdate, dqt1jg, dqt1bz, dqt2jg, dqt2bz, dqt3jg, dqt3bz, dqt4jg, dqt4bz, dqt5jg, dqt5bz, "
			+ "dqt6jg, dqt6bz, dqt7jg, dqt7bz, dqt8jg, dqt8bz, dqt9jg, dqt9bz, dqt10jg, dqt10bz, dqt11jg, dqt11bz, dqt12jg, dqt12bz) "
			+ "values (#{rgstnum,jdbcType=VARCHAR}, #{dqname,jdbcType=VARCHAR}, #{dqstate,jdbcType=VARCHAR}, #{dqdate,jdbcType=DATE}, #{dqt1jg,jdbcType=VARCHAR}, #{dqt1bz,jdbcType=VARCHAR}, #{dqt2jg,jdbcType=VARCHAR}, "
			+ "#{dqt2bz,jdbcType=VARCHAR}, #{dqt3jg,jdbcType=VARCHAR}, #{dqt3bz,jdbcType=VARCHAR}, #{dqt4jg,jdbcType=VARCHAR}, #{dqt4bz,jdbcType=VARCHAR}, #{dqt5jg,jdbcType=VARCHAR}, #{dqt5bz,jdbcType=VARCHAR}, "
			+ "#{dqt6jg,jdbcType=VARCHAR}, #{dqt6bz,jdbcType=VARCHAR}, #{dqt7jg,jdbcType=VARCHAR}, #{dqt7bz,jdbcType=VARCHAR}, #{dqt8jg,jdbcType=VARCHAR}, #{dqt8bz,jdbcType=VARCHAR}, #{dqt9jg,jdbcType=VARCHAR}, #{dqt9bz,jdbcType=VARCHAR}, "
			+ "#{dqt10jg,jdbcType=VARCHAR}, #{dqt10bz,jdbcType=VARCHAR}, #{dqt11jg,jdbcType=VARCHAR}, #{dqt11bz,jdbcType=VARCHAR}, #{dqt12jg,jdbcType=VARCHAR}, #{dqt12bz,jdbcType=VARCHAR})")
	void saveNotedq(ScsNotedq scsNotedq);

	//更新电气设备效益试验记录表
	@Update("update scs_notedq set dqname = #{dqname,jdbcType=VARCHAR},dqstate = #{dqstate,jdbcType=VARCHAR},dqdate = #{dqdate,jdbcType=DATE},dqt1jg = #{dqt1jg,jdbcType=VARCHAR},"
			+ "dqt1bz = #{dqt1bz,jdbcType=VARCHAR},dqt2jg = #{dqt2jg,jdbcType=VARCHAR},dqt2bz = #{dqt2bz,jdbcType=VARCHAR},dqt3jg = #{dqt3jg,jdbcType=VARCHAR},dqt3bz = #{dqt3bz,jdbcType=VARCHAR},"
			+ "dqt4jg = #{dqt4jg,jdbcType=VARCHAR},dqt4bz = #{dqt4bz,jdbcType=VARCHAR},dqt5jg = #{dqt5jg,jdbcType=VARCHAR},dqt5bz = #{dqt5bz,jdbcType=VARCHAR},dqt6jg = #{dqt6jg,jdbcType=VARCHAR},"
			+ "dqt6bz = #{dqt6bz,jdbcType=VARCHAR},dqt7jg = #{dqt7jg,jdbcType=VARCHAR},dqt7bz = #{dqt7bz,jdbcType=VARCHAR},dqt8jg = #{dqt8jg,jdbcType=VARCHAR},dqt8bz = #{dqt8bz,jdbcType=VARCHAR},"
			+ "dqt9jg = #{dqt9jg,jdbcType=VARCHAR},dqt9bz = #{dqt9bz,jdbcType=VARCHAR},dqt10jg = #{dqt10jg,jdbcType=VARCHAR},dqt10bz = #{dqt10bz,jdbcType=VARCHAR},dqt11jg = #{dqt11jg,jdbcType=VARCHAR},"
			+ "dqt11bz = #{dqt11bz,jdbcType=VARCHAR},dqt12jg = #{dqt12jg,jdbcType=BIT},dqt12bz = #{dqt12bz,jdbcType=VARCHAR} where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void updateNotedq(ScsNotedq scsNotedq);

	//删除电气设备效益试验记录表
	@Update("delete from scs_notedq where rgstnum = #{rgstnum,jdbcType=VARCHAR}")
	void deleteNotedq(String rgstnum);
}